Aiming pattern for imaging-based bar code readers

ABSTRACT

An aiming pattern is used with an automatic focusing system for an imaging-based bar code reader. The combination of the thick horizontal line and the thin vertical line yields an aiming pattern that can be effectively used for ranging purposes while at the same time providing sufficient illumination for decoding 1-D barcodes.

CROSS REFERENCE TO RELATED APPLICATIONS

This application is a continuation-in-part of U.S. patent applicationSer. No. 10/903,792 filed on Jul. 30, 2004, which is assigned to theassignee of the present invention, and incorporated herein by referencein its entirety.

FIELD OF THE INVENTION

The present invention relates to an aiming pattern that can be used withan automatic focusing system for an imaging-based bar code reader.

BACKGROUND OF THE INVENTION

Various electro-optical systems have been developed for reading opticalindicia, such as bar codes. A bar code is a coded pattern of graphicalindicia comprised of a matrix or series of bars and spaces of varyingwidths, the bars and spaces having differing light reflectingcharacteristics. Systems that read and decode bar codes employing CCD orCMOS-based imaging systems are typically referred to as imaging-basedbar code readers or bar code scanners.

Imaging systems include CCD arrays, CMOS arrays, or other imaging pixelarrays having a plurality of photosensitive elements or pixels. Lightreflected from a target image, e.g., a target bar code is focusedthrough a lens of the imaging system onto the pixel array. Outputsignals from the pixels of the pixel array are digitized by ananalog-to-digital converter. Decoding circuitry of the imaging systemprocesses the digitized signals and attempts to decode the imaged barcode.

The ability of an imaging system to successfully decode an imaged barcode is directly dependent upon the ability to move the lens to asuitable position whereby a satisfactorily clear image of the target barcode is focused onto the pixel array. The imaging system focusing lensis driven by a motor, such as a piezo motor, along an axis perpendicularto the pixel array or sensor plane to permit focusing of the bar codeimage on the pixel array.

Whether the imaging system is housed in a handheld, portable bar codereader or a permanently mounted reader, the user of the device cannot beexpected to manually focus the imaging system by moving the lens, thus,there is a need for an automatic focusing system or auto focus systemfor an imaging system.

Bar code imaging systems require a variable focus optical system tomaximize barcode reading range and deliver high quality images over arange of distances. The high scan rate for barcode reading imposes ahigh-speed requirement on the auto focusing technique to be used in theimaging system.

A typical two-dimensional barcode imaging scanner has an aiming patterngenerator for the user to aim the scanner at the target and a separateilluminating system for illuminating the entire two-dimensional field ofview. One auto-focusing technique that uses this aiming pattern isdescribed in the referenced parent U.S. patent application Ser. No.10/903,792 filed on Jul. 30, 2004, which is assigned to the assignee ofthe present invention, and incorporated herein by reference in itsentirety. The auto-focusing technique described in the '792 applicationuses an apparent position of a feature in the aiming pattern within theimage to calculate a distance between the scanner and the targetsurface. In the '792 application, the aiming pattern is described asbeing a single dot or a pattern of dots. One common aiming pattern is aline that the user aligns so that it cuts through the entire barcodeapproximately perpendicular to the bars of the barcode. Atwo-dimensional barcode imaging scanner that includes an aiming patternthat can be also used as an illumination source for reading aone-dimensional barcode is described in U.S. patent application Ser. No.11/262,606 filed Oct. 31, 2005, which is assigned to the assignee of thepresent invention, and incorporated herein by reference in its entirety.

SUMMARY

An aiming pattern includes a relatively long and thick horizontal lineand a perpendicular relatively short and thin vertical line that form acrosshair pattern. The combination of the thick horizontal line and thethin vertical line yields an aiming pattern that can be effectively usedfor ranging purposes while at the same time providing sufficientillumination for decoding 1-D barcodes.

A scanner is provided that processes indicia having an indicia area. Thescanner includes an aiming pattern generator that emits a crosshairaiming pattern that includes a relatively thick horizontal line longenough to impinge upon and illuminate a strip of the indicia thatencompasses the entire breadth of the indicia when the scanner is withinan operative range of the indicia. The aiming pattern also includes arelatively thin vertical line that intersects the horizontal line. Thescanner includes an imaging system with a pixel array and a focusinglens to focus an image of the target object onto the pixel array, thelens being movable along a path of travel. An automatic focusing systemmoves the lens along the path of travel to a position suitable forproperly focusing an image of the target object onto the pixel array byanalyzing a position of the crosshair aiming pattern within an image ofthe beam reflected from the target object and projected onto the pixelarray by the lens. The automatic focusing system employs a distancealgorithm to determine a distance between the imaging system and thetarget object and moves the lens along its path of travel to a suitableposition for properly focusing the target object onto the pixel array.

It may be advantageous that the horizontal line has a relatively largethickness sufficient to cover speckle noise that would be collected bythe segment of the two-dimensional array and/or if the two dimensionalarray is adapted such that a segment of the two-dimensional arraycorresponding to the swath illuminated by the aiming pattern can be readout in a shorter amount of time than is required to read out the entiretwo-dimensional array. The aiming pattern generator may also adjust anintensity of the aiming pattern based on the determined distance betweenthe imaging system and the target object such that, for example, theaiming pattern generator increases the intensity of the aiming patternas the determined distance increases.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a schematic block diagram of an imaging-based bar code readerof the present invention having an automatic focusing system;

FIG. 2 is a schematic view of the overall functioning of the automaticfocusing system;

FIG. 3 is schematic diagram of an aiming pattern of the bar code readerof FIG. 1 as used to determine range from imaging engine to targetobject;

FIG. 4 is a schematic diagram of image formation in real apertureimaging;

FIG. 5 is a schematic representation of a lens and diode arrangementthat can be used to form an aiming pattern according to one embodimentof the present invention;

FIG. 6 is a representation of the relative position the imager andaiming pattern generator according to one embodiment of the presentinvention; and

FIG. 7 is a schematic representation of an aiming pattern projected on atarget surface.

DETAILED DESCRIPTION

An imaging-based bar code reader is shown schematically at 10 in FIG. 1.The bar code reader 10, in addition to imaging and decoding both 1D and2D bar codes and postal codes, is also capable of capturing images andsignatures. In one preferred embodiment of the present invention, thebar code reader 10 is a hand held portable reader that can be carriedand used by a user walking or riding through a store, warehouse or plantfor reading bar codes for stocking and inventory control purposes.

However, it should be recognized that an aiming pattern of the presentinvention, to be explained below, may be advantageously used inconnection with any type of imaging-based automatic identificationsystem including, but not limited to, bar code readers, signatureimaging acquisition and identification systems, optical characterrecognition systems, fingerprint identification systems and the like. Itis the intent of the present invention to encompass all suchimaging-based automatic identification systems.

The bar code reader 10 includes a trigger 12 coupled to the bar codereader circuitry 13 for initiating reading of a target bar code 15positioned on an object when the trigger 12 is pulled or pressed. Thebar code reader 10 includes an imaging system or engine 20 including afocusing lens 22, a CCD imager 24 and a position encoder 29 thatprovides position information regarding the lens as it moves along itspath of travel PT. The focusing lens 22 focuses light reflected from thetarget bar code 15 onto an array of photosensors or pixels 28 of the CCDimager 24. At predetermined intervals, the pixels of pixel array 28 areread out generating an analog signal 30 representative of an image ofwhatever is focused by the lens 22 on the pixel array 28, for example,an image of the bar code 15. The analog image signal 30 is thendigitized by an analog-to-digital converter 70 and a digitized signal 74is decoded by decoder circuitry 80. Decoded data 90, representative ofthe data/information coded in the bar code 15 is then output via a dataoutput port 100 and/or displayed to a user of the reader 10 via adisplay 110. Upon achieving a good “read” of the bar code 15, that is,the bar code 15 was successfully imaged and decoded, a speaker 120 isactivated by the circuitry 13 to indicate to the user that the bar codehas been successfully read.

The focusing lens 22 is driven by a motor 29, such as a piezo motor,along its linear path of travel PT. The lens path of travel PT is alongan optical imaging axis OA and orthogonal to a light receiving planarsurface of the pixel array 28. It should be recognized that the lineslabeled PT in FIGS. 1, 3 and 4 are schematic representations of the pathof travel of the lens 22 and the lines merely illustrate the directionof the lens path of travel along the optical axis OA. As will beexplained below, the automatic focusing system 50 causes the lens 22 tobe moved from a home position HP along the path of travel PT to aposition that is suitable for decoding the digitized signal 74representative of the imaged bar code 15. (The home position may be theprevious position of the lens.) Moreover, the time required for theautomatic focusing system 50 to accomplish the movement of the lens 22to a suitable position is typically on the order of 20 ms. or less.

The bar code reader 10 further includes an aiming pattern generator 40that generates a visible aiming pattern 42 to aid the user in properlyaiming the reader at the target bar code 15. In one preferredembodiment, the aiming apparatus 40 is a laser aiming apparatus.Alternatively, the aiming apparatus 40 may utilize an LED or anothersource of illumination known to those of skill in the art. As will bedescribed in more detail below, the pattern 43 may be a patterncomprising a crosshair formed from a thick horizontal line and aperpendicular thin vertical line. In one preferred embodiment, the laseraiming apparatus 40 includes a laser diode 42 and a diffractive lens 44.

The automatic focusing system 50 employs a two step process to focus theimage on the pixel array 28, that is, to move the lens 22 to a suitableposition along its path of travel PT for successfully imaging anddecoding the target bar code 15. The first step is laser ranging. Thelaser light emitted by the laser diode 42 to generate the laser aimingpattern 43 travels outwardly toward the target bar code 15. The laserbeam impacts the bar code 15 or the object the bar code is affixed toand is reflected back toward the reader where it is focused on the pixelarray 28 by the lens 22. Laser ranging utilizes the laser aimingapparatus 40 to determine an object distance u (shown in FIGS. 2 and 3)between a principal plane PP of the lens 22 and the object plane OP,that is, a surface of the target bar code 15, along the optical axis OA.The object distance u is computed using a parallax distance algorithm.

Using geometric relationships, the parallax distance algorithmdetermines the object distance u. Given that the object distance u hasbeen determined and further given that the focal length f of the lens isknown, the image distance v can be computed using the standard lensequation (Thin Lens law) 1/f=1/u+1/v. The image distance v is thedistance between the principal plane PP of the lens 22 and the imageplane IP, that is, a light receiving surface of the pixel array 28. Theautomatic focusing system then moves the lens 22 along its path oftravel PT to a suitable position such that a satisfactory image of thelaser aiming pattern is focused onto the pixel array 28.

If laser ranging is not successful in determining the distance betweenthe lens 22 and the bar code 15 the automatic focusing system 50proceeds to focus analysis to determine a suitable position for the lens22 to decode the imaged bar code 15. In focus analysis, multiple framesor images of the target bar code 15 are read out from the pixel array 28at different lens positions. The images are analyzed for image clarityby the automatic focusing system 50 and a suitable position for the lens22 is determined. Movement of the lens from the home position HP alongits path of travel PT is determined via a search routine or heuristicwhich seeks a satisfactory focus position.

Laser Ranging

The laser diode 42 produces the aiming pattern 43 that assists the userin aiming the reader at the target bar code 15. Using the laser lightreflected from the bar code 15, the same laser beam pattern 43 can beused to determine the object distance u (FIG. 2) from the pixel array 28to the target bar code 15. Utilizing a standard lens formula, the objectdistance u of the target bar code 15 is translated to the image distancerequired to achieve a focused image of the target bar code 15 on thepixel array 28. This, in turn, determines the desired lens positionalong its path of travel PT.

In order to estimate the distance u of the lens 22 to the bar code 15,the crosshair aiming pattern is projected onto the bar code and an imageof the laser pattern reflected from the bar code 15 is projected ontothe pixel array 28. Turning to FIG. 2, the z-axis of the referencecoordinate system is defined by the optical axis, OA, and the origin Ois defined by the intersection of the z-axis with the principal plane ofthe lens 22. A 3D vector V is represented by:V=v+z{circumflex over (z)}, v·{circumflex over (z)}=0,where v is the projection of V on the image plane (that is, the plane ofthe pixel array 28) and z is the projection on the z-axis.The laser beam (the line labeled LB in FIG. 2) can be modeled as a 3Dline:l=g+βz,  (1)where g and β are 2D vectors that define the position and direction ofthe laser beam, respectively. Let α be a 2D vector that representsP_(i), the projection of the laser dot P on the image plane. Accordingto the law of perspective projection:l=αz, α=f _(bl) v _(pl),  (2)where f_(bl) is the back focal length and v_(pl) is the 2D coordinate ofP_(i).

Combining equations (1) and (2) and solving for z: $\begin{matrix}{z = {\frac{g^{2}}{\left( {\alpha - \beta} \right)g}.}} & (3)\end{matrix}$g and β can be obtained through calibration (see Section 2.2). Once thecrosshair aiming pattern is located in the image, z can be computedusing equation (3). Note that the back focal length f does not appear in(3) since α is represented in number of pixels. The object distance u ofthe principal plane PP of the lens 22 to the target bar code 15 is,therefore, u=z.Calibration of Laser Beam

To calibrate the laser beam LB, from equations (1) and (2):(α−β)z=g.  (4)Rewriting equation (4): $\begin{matrix}{{\left\lbrack {g\quad\beta} \right\rbrack \cdot \begin{bmatrix}1 \\z\end{bmatrix}} = {\alpha\quad{z.}}} & (5)\end{matrix}$

There are two unknowns to calibrate, g and β. Theoretically, only twomeasurements are needed to get g and β. However, in order to minimizethe measurement error, multiple measurements are collected and leastsquares is used to get the optimal values.

Assume n measurements, the n inputs can be written as: $\begin{matrix}{{{{Z \cdot v} = C},{where}}{{Z = \begin{bmatrix}1 & z_{1} \\1 & z_{2} \\\vdots & \vdots \\1 & z_{n}\end{bmatrix}},{v = \begin{bmatrix}g \\\beta\end{bmatrix}},{C = {\begin{bmatrix}{\alpha_{1}z_{1}} \\{\alpha_{2}z_{2}} \\\vdots \\{\alpha_{n}\quad z_{n}}\end{bmatrix}.}}}} & (6)\end{matrix}$

Define an error vector E as E=Z·v−C, since Z·v is the laser spot definedby the line equation of the laser beam LB, and C is the same point butderived from the line equation from the 2D projection in the image.Minimizing E² yieldsZ′(Z·v−C)=0.  (7)Expanding equation (7): $\begin{matrix}{{\begin{bmatrix}n & {\sum\limits_{i = 1}^{n}z_{i}} \\{\sum\limits_{i = 1}^{n}z_{i}} & {\sum\limits_{i = 1}^{n}z_{i}^{2}}\end{bmatrix} \cdot \begin{bmatrix}g \\\beta\end{bmatrix}} = {\begin{bmatrix}{\sum\limits_{i = 1}^{n}{\alpha\quad z_{i}}} \\{\sum\limits_{i = 1}^{n}{\alpha\quad z_{i}^{2}}}\end{bmatrix}.}} & (8)\end{matrix}$Multiplying both sides with the inverse of the coefficient matrix:$\begin{matrix}\begin{matrix}{\begin{bmatrix}g \\\beta\end{bmatrix} = {\begin{bmatrix}n & {\sum\limits_{i = 1}^{n}z_{i}} \\{\sum\limits_{i = 1}^{n}z_{i}} & {\sum\limits_{i = 1}^{n}z_{i}^{2}}\end{bmatrix}^{- 1} \cdot {\begin{bmatrix}{\sum\limits_{i = 1}^{n}{\alpha\quad z_{i}}} \\{\sum\limits_{i = 1}^{n}{\alpha\quad z_{i}^{2}}}\end{bmatrix}.}}} & \square\end{matrix}^{\square} & (9)\end{matrix}$

In the perspective projection model, z-bias needs to be taken care of.Dividing z on both sides of equation (5) results in: $\begin{matrix}{{{\left\lbrack {g\quad\beta} \right\rbrack \cdot \begin{bmatrix}\underset{\_}{1} \\z \\1\end{bmatrix}} = \alpha},} & (10)\end{matrix}$and consequently equation (6) becomes $\begin{matrix}\begin{matrix}{\begin{bmatrix}g \\\beta\end{bmatrix} = {\begin{bmatrix}{\sum\limits_{i = 1}^{n}\frac{1}{z_{i}^{2}}} & {\sum\limits_{i = 1}^{n}\frac{1}{z_{i}}} \\{\sum\limits_{i = 1}^{n}\frac{1}{z_{i}}} & n\end{bmatrix}^{- 1} \cdot {\begin{bmatrix}{\sum\limits_{i = 1}^{n}\frac{\alpha}{z_{i}}} \\{\sum\limits_{i = 1}^{n}\alpha}\end{bmatrix}.}}} & \square\end{matrix}^{\square} & (11)\end{matrix}$Thus, g and β have been solved. Notice that the solution of g and βcontains f_(bl), the back focal length. When computing z using equation(3), f_(bl) will be cancelled out. Thus in practice, the coordinates innumber of pixels are represented directly.

The auto focus system 50 calibrates g and β relative to a referenceposition or home position HP of the lens 22 and magnification iscorrected in the calculation.

Precision of Laser Ranging

Assuming g and β are constants, differentiating both sides of equation(4) results in: $\begin{matrix}{\frac{d\quad z}{z} = {{- \frac{z \cdot g}{g^{2}}}d\quad{\alpha.}}} & (12)\end{matrix}$

This suggests that the relative precision of z is linearly proportionalto dα. However there are errors, either in calibration of g and β, orcaused by other systematic reasons. Taking g and β as variables resultsin: $\begin{matrix}{\frac{d\quad z}{z} = {\frac{{g \cdot d}\quad g}{g^{2}} - \frac{{z \cdot g \cdot d}\quad\alpha}{g^{2}} + \frac{{z \cdot g \cdot d}\quad\beta}{g^{2}}}} & (13)\end{matrix}$

The goal of the auto focusing system 50 is to bring the image intofocus. The depth of field of the imaging system 20 permits imprecisionin the range measurement. The autofocusing system 50 is, therefore,interested in the image space in which the error of the ranging (thatis, the error in determining u) is transformed into the error in imagedistance v, which in turn is reflected as the blur circle BC in theimage. FIG. 3 illustrates the geometric relationship between radius ofthe blur circle BC and the offset in image distance. After the objectdistance u is computed, given the focal length f, the image distance vis computed. Given that the lens 22 is in its home position HP along thepath of travel PT, it is unlikely that the actual distance (shown as v′in FIG. 4) between the principal plane PP of the lens 22 and the imageplane IP (surface of the pixel array 28) is equal to the image distancev. Thus, the image of the laser dot projected on the pixel array 28 isan unfocused blur circle BC. The automatic focusing system 50 then mustmove the lens 22 along its path of travel so that a sharp image isfocused on the pixel array 28. However, in accordance with the Thin Lenslaw (1/f=1/u+1/v) note that as the lens 22 moves along the path oftravel PT, the object distance u and image distance v both change.

The diffraction blur is not considered by the auto focusing system 50since size of the error disk caused by diffraction is sub-pixel and thepixel array 28 is assumed to be a mega-pixel configuration. The radiusof the blur circle BC is: $\begin{matrix}{R = {{\frac{D}{2}\left( \frac{v^{\prime} - v}{v} \right)} = {\frac{D}{2} \cdot \frac{\delta\quad v}{v}}}} & (14)\end{matrix}$

The Thin Lens law provides: $\begin{matrix}{{\frac{1}{u} + \frac{1}{v}} = {\frac{1}{f}.}} & (15)\end{matrix}$Differentiating both sides of equation (15) results in: $\begin{matrix}{\frac{du}{u^{2}} = {- {\frac{dv}{v^{2}}.}}} & (16)\end{matrix}$

In practice, there are other error sources that will impact the focusingresults, for example the inherent error of the piezo motor 29, i.e. thedifference between the desired position the automatic focusing system 50wants the motor to move the lens 22 to and the actual position the motormoves the lens to. Taking this into consideration, equation (14) can berewritten: $\begin{matrix}{{R = {\frac{D}{2} \cdot \left( {{{- \frac{v}{u}} \cdot \frac{\delta\quad u}{u}} + \frac{\delta\quad v_{m}}{v}} \right)}},} & (17)\end{matrix}$where δν_(m) is the average motor error.Substituting equation (13) into (17) results in: $\begin{matrix}{R = {\frac{D}{2} \cdot {\left( {{{- \frac{v - f}{f}} \cdot \frac{{g \cdot d}\quad g}{g^{2}}} + \frac{{v \cdot g \cdot d}\quad\alpha}{g^{2}} - \frac{{v \cdot g \cdot d}\quad\beta}{g^{2}} + \frac{\delta\quad v_{m}}{v}} \right).}}} & (18)\end{matrix}$g and β are calibrated relative to a camera coordinate system. In theauto focus system 50 where the lens 22 moves, i.e. the origin of thecoordinate system moves, the offset of the origin dominates the errorsof g and β. The lens moves along the z-axis (that is, along optical axisOA) only. Thus,δg=g+β·δz−g=β·δz  (19)

Since the lens 22 moves along the z-axis only, dβ is 0. Thus, equation(18) simplifies to: $\begin{matrix}{R = {\frac{D}{2}{\left( {{{- \frac{v - f}{f}} \cdot \frac{g \cdot \beta \cdot \left( {k\quad\delta\quad z} \right)}{g^{2}}} + \frac{{v \cdot g \cdot d}\quad\alpha}{g^{2\quad}} + \frac{\delta\quad v_{m}}{v}} \right).}}} & (20)\end{matrix}$

In equation (18), the first part in the parenthesis is of the same orderas the other two parts and thus cannot be ignored. A position encoder 27(FIG. 1) installed in the imaging engine 20, system provides real-timereadings of the lens position along its path of travel PT relative to ahome position HP, which can be calibrated when the imaging system 20 isassembled. Thus, the error can be corrected and equation (20) can besimplified to the following: $\begin{matrix}{R = {\frac{D}{2} \cdot {\left( {\frac{{v \cdot g \cdot d}\quad\alpha}{g^{2}} + \frac{\delta\quad v_{m}}{v}} \right).}}} & (21)\end{matrix}$

The automatic focusing system 50 uses equation (21) to estimate thepixel location accuracy needed to meet the desired focusing requirement,or vise versa. By increasing aperture size, focal length, or reducingpixel size, offset of the laser beam, dα will decrease, i.e, higheraccuracy in pixel location will be needed.

Locating the Aiming Pattern 43

The essence of laser ranging is locating the center of the aimingpattern 43 which is located at the intersection of the thick horizontalline 43 a and the thin vertical line 43 b. Considering the image of thelaser beam is highly blurred when the lens 22 is out of focus, it isnecessary for the automatic focusing system 50 to identify a region ofinterest (ROI) of the laser spot, i.e., the region where the aimingpattern 43 lies and its blurred peripheral, and compute the center ofmass (COM): $\begin{matrix}{{X = \frac{\sum\limits_{i}{i*{I(i)}}}{\sum\limits_{i}{I(i)}}},} & (22)\end{matrix}$where i indicates the x coordinate of the pixels within the ROI and I(i)their corresponding intensity. The same applies to the Y coordinate.

A detailed theoretical analysis of the COM computation is presented inan article entitled “Novel Denoising Algorithm for Obtaining aSuperresolved Position Estimation” by Z. Zalevsky, et al., Opt. Eng.,41(6), pp. 1350-1357, June 2002. The foregoing article is incorporatedin its entirety by reference herein. However, given that the imagingengine 20 is used as an imager, the background is likely to overlap withhigh frequency patterns and thus become the dominant source of noise,the quantization error and shot noise can be ignored.

Note that the magnification changes with movement of the lens 22 andthis effect cannot be ignored. A projection line of the laser beam isnormalized according to the real-time lens position by the automaticfocusing system 50, and the final coordinates of the aiming patterncenter are normalized with respect to magnification.

The process used by the automatic focusing system 50 for locating thecenter of the aiming pattern is illustrated in FIG. 4. The aimingpattern is highly blurred. The line PLB indicates the pre-computedprojection of the laser beam on the image plane (pixel array 28) withthe magnification corrected. Pixels with intensity considered “bright”are in light color. The COM of the bright region is marked COM. Thepixel marked CCOM is the COM after magnification is corrected. Shapeanalysis can be applied to filter noise. A simpler alternative is torepeat the COM computation until all highlighted pixels are within areasonable distance of the center.

The heart of the problem is locating the ROI. The automatic focusingsystem 50 searches along the laser projection line PLB to determine thethreshold of “bright” pixels. To reduce the search time, the automaticfocusing system 50 employs a sampling and search algorithm that samplesevery other pixel both in row and in column. Meanwhile, the automaticfocusing system 50 accumulates statistics in blocks so that it canquickly locate the blocks containing those bright pixels after thethreshold is determined, and thus avoid a second pass of the search. Thestatistics accumulated are the maximum intensity of every block. Afterthe brightness threshold is determined from the histogram, the algorithmused by the automatic focusing system 50 goes through the blocks andidentifies those with maximum intensity beyond the threshold.

The automatic focusing system algorithm chooses the width of the blockto be the maximum possible width of the aiming pattern 43 (under blur),and the height of the block to be half of the width. Thus, the aimingpattern 43 can cover at most three consecutive blocks. This can be usedto eliminate stochastic bright spots in the scene. If the automaticfocusing system 50 finds more than 3 blocks with maximum intensitygreater than the threshold, or 3 such blocks that are not next to eachother, the algorithm halts because multiple bright spots are detected inthe scene. Once the blocks that contain the aiming pattern 42 arecorrectly identified, the COM can be computed. The subsampling rate andblock size can be adjusted to achieve the best performance of the searchalgorithm.

Aiming Pattern Used as 1-D Illumination

U.S. patent application Ser. No. 10/903,792 describes an imaging scannerthat generates an aiming line that can be used concurrently asillumination for reading a one-dimensional or simple two-dimensionalbarcodes. The scanner includes an imaging system 20 having atwo-dimensional array of sensors such as CCD or CMOS sensors that senselight reflected back from the target surface and form pixel datacorresponding to an image of the target. It is advantageous to use anarray sensor that has the capability to output a portion of pixels uponrequest, so that the transfer time and processing time can be shortenedwhen only a portion of the array is properly exposed. One such sensor isa CMOS array made by Micron having part number MT9M001. The pixel datafrom the array is converted into digital data by an A/D converter 70that is decoded by decoding system 80. An output port or display 110provides the results of decoding to a peripheral device (not shown) ordisplays them to the user. The scanner 10 also includes an illuminationsource (not shown) that is capable, within a prescribed scanner range,of illuminating a portion of the target surface sufficient to fill theentire two-dimensional array of sensors with data. The scanner includesan aiming pattern generator 40 that includes one or more laser diodes 42and a focusing lens 44 (see FIG. 1) that is activated by a user actuatedtrigger 12.

The aiming pattern generator 40 generates an aiming line (or pattern)that is concurrently used as illumination for a narrow segment of thetwo-dimensional imaging array when the scanner is being operated in anarrow window scanning, or 1-D, mode. In 1-D mode, the user aligns theaiming/illumination line on the barcode and data from a narrow segmentof the two-dimensional array is read out and decoded. For aone-dimensional barcode, data from the narrow segment of the array issufficient to decode the barcode. If the decode is successful, thefull-scale illumination is never activated, saving time and power.Therefore the scanner can decode one-dimensional barcodes much moreaggressively than two-dimensional barcodes. The frame read-out time forthe narrow segment of the array can be orders of magnitude shorter thanthe read-out time for the entire array. The amount of light delivered inthe aiming/illumination line can be much brighter than that delivered tothe entire two-dimensional target area, thus improving the working rangeof the scanner with respect to one-dimensional barcodes.

The ability to operate in 1-D mode can be especially advantageous forhigh resolution imaging scanners having frame read-out times over 33milliseconds and can be used with scanners that use color sensors. 1-Dmode operation can be provided in camera-enabled mobile phones andmobile computers to minimize power dissipation and improve scanningperformance. While the color of the aiming/illumination line is notimportant for monochrome sensors, it is advantageous to use a white orgreen line for color sensors. If green light is used with color sensors,then two adjacent rows of the sensor array can be merged to form afull-resolution line across the barcode. If white light is used, thenall of the colors of the sensor can be used. 1-D mode can be used withsensors that have a global or rolling electronic shutter, or amechanical shutter.

FIGS. 5-6 illustrate two possible aiming/illumination line generatingsystems 40. In FIG. 5 a cylindrical lens 44 focuses light output fromLEDs 42 into a narrow band. The several LEDs can be turned onindividually to narrow the aiming/illumination line or together to widenthe line. Staggering the effective areas of the LEDs as shown reducesthe likelihood of gaps in the illumination pattern. Depending on theamount of light needed to decode a one-dimensional barcode, more LEDscan be switched on automatically or by the user.

It is also possible to have multiple rows of LEDs for theaiming/illumination line such that if a PDF417 barcode is detected, morerows of LEDs are switched on and the vertical field of view is openeddynamically to read the barcode. The user may switch to a PDF417 mode toactivate the additional LEDs or an auto-discrimination function may beused to detect the presence of a PDF417 barcode on the target. Usingseveral lines of LED illumination can improve the depth of field becausethe illumination can be significantly brighter than full fieldillumination.

FIG. 6 shows an alternative embodiment of an aiming pattern generator40′. A laser (not shown) can be placed behind an optical element 210 togenerate the aiming pattern 43 that is bright enough to illuminate a onedimensional barcode for decoding. Advantageously, the aiming pattern 43consists of a horizontal line bisected by a vertical line (also shown inFIG. 7). The combination of the thick horizontal line and the thinvertical line yields an aiming pattern that can be effectively used forranging purposes while at the same time providing sufficientillumination for decoding 1-D barcodes. Additionally, the aiming patterncan include an outline 57 to aid the user in determining whether theentire barcode is within the imaging area of the scanner.

To lessen the effects of “speckle noise” or bright spots in the imagethat are typically created by a laser, the horizontal line is maderelatively thick and bright so that bright light from the aiming patternmore than covers the target area corresponding to the segment of thearray that is used for decoding. In addition the thickness of thehorizontal line can provide sufficient illumination of a swath of thebarcode to allow for multiple decode attempts or allow for signalprocessing such as averaging that can improve the signal to noise ratio.This signal processing may compensate for the presence of speckle noise.While the thickness of the horizontal component of the crosshair addssome uncertainty to the location of the crosshair and consequently tothe distance of the target. This uncertainty can be reduced by locatingthe aiming pattern generating system horizontally with respect to theimaging system 24 as shown in FIG. 6.

The horizontal line is used primarily for illumination and the verticalline is the primary source of information for ranging. Since thevertical line is thin, the uncertainty as to its location is reduced andthe accuracy of the range information is increased. This arrangement canalso result in fast auto-exposure settling times. The outline 57 canprovide a high frame rate for 1-D barcodes and fast auto-exposuresettling times. In addition, the outlined cross hair of the aimingpattern causes the user to align a 1-D barcode so that the elements areperpendicular to the horizontal line and contained within the outline.This facilitates the capture of a swath of data from the center of the1-D barcode that can be readily decoded.

A crosshair aiming pattern that includes a bright thick horizontal lineand a thin vertical line provides additional benefits. The brighthorizontal line improves the working range of the 1-D decoding system.The bright horizontal line reduces exposure times and increases handjitter tolerance. Ranging with the vertical line ensures well exposedand focused images, in those cases when focus is variable.

The ranging information can also be used to adjust the intensity of thethick horizontal line. If the target is far away, then the intensity canbe maximized to improve signal quality. If the target is near, then theintensity can be reduced to minimize power dissipation.

While the present invention has been described with a degree ofparticularity, it is the intent that the invention includes allmodifications and alterations from the disclosed design falling with thespirit or scope of the appended claims.

1. A scanner that processes indicia having an indicia area comprising:an aiming pattern generator that emits a crosshair aiming pattern thatincludes a relatively thick horizontal line long enough to impinge uponand illuminate a strip of the indicia that encompasses the entirebreadth of the indicia when the scanner is within an operative range ofthe indicia, the aiming pattern also including a relatively thinvertical line that intersects the horizontal line; an imaging systemthat includes a pixel array, a focusing lens to focus an image of thetarget object onto the pixel array, the lens movable along a path oftravel; and an automatic focusing system operating to move the lensalong the path of travel to a position suitable for properly focusing animage of the target object onto the pixel array, the automatic focusingsystem analyzing a position of the crosshair aiming pattern within animage of the beam reflected from the target object and projected ontothe pixel array by the lens and employing a distance algorithm todetermine a distance between the imaging system and the target objectand moving the lens along its path of travel to a suitable position forproperly focusing the target object onto the pixel array.
 2. The scannerof claim 1 wherein a segment of the two-dimensional array sensors iscapable of collecting data corresponding to an image of the portion ofthe indicia illuminated by the horizontal line.
 3. The scanner of claim1 wherein the aiming pattern generator includes one or more LEDs.
 4. Thescanner of claim 3 wherein the LEDs are arranged in one or morestaggered rows.
 5. The scanner of claim 3 wherein each of the one ormore LEDs can be selectively activated.
 6. The scanner of claim 1wherein the aiming pattern generator includes a focusing lens.
 7. Thescanner of claim 1 wherein the aiming pattern generator includes a laserand an optical element that forms the aiming pattern.
 8. The scanner ofclaim 2 comprising a decoder that selectively receives and decodes datafrom the segment of the two-dimensional array of sensors to process theindicia.
 9. The scanner of claim 2 wherein the horizontal line has arelatively large thickness sufficient to cover speckle noise that wouldbe collected by the segment of the two-dimensional array.
 10. Thescanner of claim 2 wherein the two dimensional array is adapted suchthat the segment of the two-dimensional array can be read out in ashorter amount of time than is required to read out the entiretwo-dimensional array.
 11. The scanner of claim 1 wherein the aimingpattern includes a rectangular outline surrounding the horizontal andvertical lines.
 12. The scanner of claim 1 wherein the aiming patterngenerator adjusts an intensity of the aiming pattern based on thedetermined distance between the imaging system and the target object.13. The scanner of claim 12 wherein the aiming pattern generatorincreases the intensity of the aiming pattern as the determined distanceincreases.
 14. A method of focusing an image of a target object on animaging system of an automatic identification system including animaging system including a pixel array, a focusing lens to focus animage of the target object onto the pixel array, the lens movable alonga path of travel, the method comprising: generating a crosshair aimingpattern that includes a relatively thick horizontal line perpendicularlyintersected by a relatively thin vertical line beam to aid in aiming thesystem at a target object when the system is actuated; analyzing alocation of the crosshair aiming pattern within an image of the beamreflected from the target object and projected onto the pixel array bythe lens and employing a distance algorithm to determine a distancebetween the imaging system and the target object based on the positionof the crosshair aiming pattern; and moving the lens along the path oftravel to a suitable position for properly focusing the target objectonto the pixel array based on the determined distance.
 15. The method offocusing an image of claim 14 wherein the target object is a bar code tobe imaged and decoded.
 16. The method of focusing an image of claim 14wherein the distance algorithm is a parallax distance algorithm based onthe parallax or offset between the beam and an imaging axis.
 17. Themethod of focusing an image of claim 14 wherein the aiming patternincludes a rectangular outline that surrounds the horizontal andvertical lines.
 18. The method focusing an image of claim 14 furthercomprising: illuminating a portion of the indicia with the horizontalline of the crosshair aiming pattern generated by the scanner;collecting data indicative of an image reflected back from theilluminated portion of the indicia in a segment of the two dimensionalarray of light sensors; and decoding the indicia based on the collecteddata from the portion of the indicia that is illuminated by thehorizontal line.
 19. The method of claim 14 wherein the aiming patternis generated by powering one or more LEDs.
 20. The method of claim 14wherein the aiming pattern is generated by powering a laser.
 21. Themethod of claim 20 wherein aiming pattern is generated by causing thelaser to act upon an optical element to form the aiming pattern fromlight from the laser.
 22. The method of claim 18 wherein an intensity ofthe aiming pattern is adjusted based on the determined distance betweenthe imaging system and the target object.
 23. The method of claim 22wherein the intensity of the aiming pattern is increased as thedetermined distance increases.
 24. Computer readable media havingcomputer-executable instructions stored thereon for focusing an image ofa target object on an imaging system of an automatic identificationsystem including an imaging system including a pixel array, a focusinglens to focus an image of the target object onto the pixel array, thelens movable along a path of travel, the instructions comprising:generating a crosshair aiming pattern that includes a relatively thickhorizontal line perpendicularly intersected by a relatively thinvertical line beam to aid in aiming the system at a target object whenthe system is actuated; analyzing a location of the crosshair aimingpattern within an image of the beam reflected from the target object andprojected onto the pixel array by the lens and employing a distancealgorithm to determine a distance between the imaging system and thetarget object based on the position of the crosshair aiming pattern; andmoving the lens along the path of travel to a suitable position forproperly focusing the target object onto the pixel array based on thedetermined distance.
 25. The computer readable media of claim 24 whereininstructions for analyzing the location of the crosshair aiming patternemploy a parallax distance algorithm based on the parallax or offsetbetween the beam and an imaging axis.
 26. The computer readable media ofclaim 24 wherein the aiming pattern includes a rectangular outline thatsurrounds the horizontal and vertical lines.
 27. The computer readablemedia of claim 24 wherein the instructions further comprise:illuminating a portion of the indicia with the horizontal line of thecrosshair aiming pattern generated by the scanner; collecting dataindicative of an image reflected back from the illuminated portion ofthe indicia in a segment of the two dimensional array of light sensors;and decoding the indicia based on the collected data from the portion ofthe indicia that is illuminated by the horizontal line.
 28. The computerreadable media of claim 27 wherein the instructions further compriseadjusting an intensity of the aiming pattern based on the determineddistance between the imaging system and the target object.
 29. Thecomputer readable media of claim 24 wherein the intensity of the aimingpattern is increased as the determined distance increases.
 30. Apparatusthat processes indicia having an indicia area comprising: means foremitting a crosshair aiming pattern that includes a relatively thickhorizontal line long enough to impinge upon and illuminate a strip ofthe indicia that encompasses the entire breadth of the indicia when theapparatus is within an operative range of the indicia, the aimingpattern also including a relatively thin vertical line that intersectsthe horizontal line; means for imaging that includes a pixel array, afocusing lens to focus an image of the target object onto the pixelarray, the lens movable along a path of travel; and means for moving thelens along the path of travel to a position suitable for properlyfocusing an image of the target object onto the pixel array, the meansfor moving analyzing a position of the crosshair aiming pattern withinan image of the beam reflected from the target object and projected ontothe pixel array by the lens and employing a distance algorithm todetermine a distance between the imaging system and the target objectand moving the lens along its path of travel to a suitable position forproperly focusing the target object onto the pixel array;